home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
tlxjwpc5.zip
/
RECORDER.SLT
< prev
next >
Wrap
Text File
|
1991-10-11
|
3KB
|
65 lines
// JW-PC Telix 3.12 script 10-11-91
// For use to store data dumped from a data recorder via serial port.
//
// Script will: Close any existing capture file, set port and parameters
// for Com1,9600,n,8,1, opens new capture file via user input,
// and notifies user to begin or warns of error condition.
// User should edit capture path as needed or delete line if
// default capture path is correct.
//
// Compile script with CS.
//
// Script originally set to capture data from a Nikon DR2 data recorder
//
main() { if (capture_stat() != 0) //If we have a capture file
{ //already open or paused,
capture("*CLOSE*"); //close it.
}
str cap_dir[64]="d:\data\plan\"; //Put your capture path here
str message[80]; str s[1];
str cap_name[12]; //Buffer for filename
str dat[8];
int save;
int key;
int i;
int atest; //Default
int stest; // system
atest=_alarm_on; // settings
stest=_sound_on; // storage for alarm
set_port(1); //Use Com1
set_cparams(9600, 0, 8, 1); //Set cfg to 9600,N,8,1
set_terminal("tty"); //Use TTY terminal
save=vsavearea(10,10,66,13); //Save the screen...
box(10,10,66,13,2,0,31); //Draw box, ask the question...
pstraxy(" Enter the filename to save DR2 data into: ",15,11,30);
pstraxy(" ________ ",20,12,30);
gotoxy(34, 12);
gets(cap_name, 8); //Process the response
vrstrarea(save); //Restore the screen...
strcat(cap_name,".DR2"); //Add ext to cap_name
strcat(cap_dir,cap_name); //Put path in front of cap_name
strupper(cap_dir); //Make it all caps
if (capture(cap_dir) == -1) //Try to open capture file,
{ //if error, construct message...
strcat(message,"ERROR in opening ");
strcat(message,cap_dir);
strcat(message," capture file.");
_alarm_on=1;
_sound_on=1;
alarm(1); //beep notification
status_wind(message, 60); //print message
_alarm_on=atest;
_sound_on=stest;
}
else
{ //if OK, construct messages...
strcat(message,"Capture file ");
strcat(message,cap_dir);
strcat(message," successfully opened.");
status_wind(message, 20); //print message
delchrs(message, 0, 80);
strcat(message," Begin Data Recorder dump session now.");
status_wind(message, 60); //print message
}
}